package com.xctech.yace.swing;

import com.xctech.yace.util.DirUtil;

import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;

public abstract class FatherSwing {

    public static Properties consumerPropties(){
        String filePath = DirUtil.getOrgPath()+"conf/kafkaconsumer.properties";
        Properties props = new Properties();
        try {
            props.load(new FileInputStream(filePath));
        } catch (
                IOException e) {
            e.printStackTrace();
        }
        return props;
    }

    public static Properties productPropties(){
        String filePath = DirUtil.getOrgPath()+"conf/kafka.properties";
        Properties props = new Properties();
        try {
            props.load(new FileInputStream(filePath));
        } catch (
                IOException e) {
            e.printStackTrace();
        }
        return props;
    }

    public static Properties dbPropties(){
        String filePath = DirUtil.getOrgPath()+"conf/db.properties";
        Properties props = new Properties();
        try {
            props.load(new FileInputStream(filePath));
        } catch (
                IOException e) {
            e.printStackTrace();
        }
        return props;
    }

    public static Properties vimDbPropties(){
        String filePath = DirUtil.getOrgPath()+"conf/cleardb.properties";
        Properties props = new Properties();
        try {
            props.load(new FileInputStream(filePath));
        } catch (
                IOException e) {
            e.printStackTrace();
        }
        return props;
    }

}
